package br.ufrgs.inf.engsoft.stp.product;

import java.util.List;

import br.ufrgs.inf.engsoft.stp.persistence.AbstractDao;

public class ProductDao extends AbstractDao<Product, Long> {
	
	public void create(Product p) {
		super.create(p);
	}
	
	public List<Product> readAll() {
		return super.readAll(Product.class);
	}

	public Product read(Long id) {
		return (Product) super.read(Product.class, id);
	}

	public void update(Product transientObject) {
		super.update(transientObject);
	}

	public void delete(Product persistentObject) {
		super.delete(persistentObject);
	}
	
	public boolean exists(Long id) {
		return (boolean) (super.read(Product.class, id) != null);
	}
}
